import { createApp } from 'vue'
//导入elementPuls
import ElementPuls from 'element-plus'
//导入elementPuls的样式
import 'element-plus/dist/index.css'

import App from './App.vue'
import router from './router'

//导入 pinia 
import { createPinia } from 'pinia'
const app = createApp(App)

//调用createPinia 的到一个实例
const pinia = createPinia();
//导入pinia持久化插件
import { createPersistedState } from 'pinia-persistedstate-plugin'
//得到对应函数
const persist = createPersistedState();
//通过pinia来调用
pinia.use(persist)
app.use(router)
//导入中文包
import locale from 'element-plus/dist/locale/zh-cn'

//use应用
app.use(ElementPuls,{locale})
app.use(pinia)
app.mount('#app')
